Turn text around a certain character in python